<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

{% comment %}
<!--
  Copyright (C) 2010 ZHENG Zhong <http://www.zhengzhong.net/>
  Created on 2010-02-08.
  $Id$
-->
{% endcomment %}

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

  <head>

    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title>{% block html_title %}{% endblock %} :: {{ site_name_|escape }}</title>
    <link rel="shortcut icon" type="image/ico" href="/favicon.ico"/>

    <!-- jQuery, jQuery UI, Google Maps API (via Google Javascript API) -->
    <script src="http://www.google.com/jsapi?key={{ google_ajax_api_key_ }}" type="text/javascript"></script>
    <script type="text/javascript">//<![CDATA[
      google.load("jquery", "1.4.2");
      google.load("jqueryui", "1.8.0");
      google.load("maps", "2");
    //]]></script>

    <!-- jQuery UI flick theme -->
    <link rel="stylesheet" type="text/css" media="screen,print" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/themes/flick/jquery-ui.css"/>

    <!-- Website specific javascript library -->
    <script src="{{ static_ }}/js/friday.js" type="text/javascript"></script>

    <link rel="stylesheet" type="text/css" media="screen,print" href="{{ static_ }}/css/layout.css"/>
    <link rel="stylesheet" type="text/css" media="screen,print" href="{{ static_ }}/css/common.css"/>
    <link rel="stylesheet" type="text/css" media="screen,print" href="{{ static_ }}/css/form.css"/>
    <link rel="stylesheet" type="text/css" media="screen,print" href="{{ static_ }}/css/table.css"/>
    <link rel="stylesheet" type="text/css" media="screen,print" href="{{ static_ }}/css/user.css"/>

    {% block html_head %}{% endblock %}

    <!-- Google Analytics async-tracking code -->
    <script type="text/javascript">//<![CDATA[
      var _gaq = _gaq || [];
      _gaq.push(['_setAccount', 'UA-356705-9']);
      _gaq.push(['_trackPageview']);
      (function() {
        var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
        ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
        var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
      })();
    //]]></script>

  </head>

  <body>

    {% block html_body %}

      <div id="outer-wrapper">

        {% block no_ie %}

          {% ifequal browser_.id "MSIE" %}
            <div id="no-ie-wrapper">
              <b>Attention:</b>
              <a href="{% url friday.about topic='browser' %}">bad browser detected!</a>
            </div>
          {% endifequal %}

        {% endblock %}

        <!-- topbar-wrapper ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->

        <div id="topbar-wrapper">

          {% block topbar %}

            <div class="topbar-logo">
              <a href="{% url friday.home %}">
                <img src="{{ static_ }}/images/logo.gif" alt="{{ site_name_|escape|default:'logo' }}"/>
              </a>
            </div>

            <div class="topbar-text">
              {% if user_ %}
                <a href="{% url friday.view_profile username=user_.username %}"><b>{{ user_|escape }}</b></a>
                &bull; <a href="{{ logout_url_ }}">Logout</a>
              {% else %}
                <a href="{{ login_url_ }}">Login</a>
              {% endif %}
              &bull; <a href="{% url friday.home %}">Home</a>
              &bull; <a href="{% url friday.about %}">About</a>
            </div>

            <div class="clear"></div>

          {% endblock %}

        </div><!--/#topbar-wrapper-->

        <!-- navbar-wrapper ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->

        <div id="navbar-wrapper">

          {% block navbar %}

            <div class="menutabs">
              <a href="{% url friday.groups_home %}">Groups</a>
              <a href="{% url friday.restos_home %}">Restos</a>
            </div>

          {% endblock %}

        </div><!--/#navbar-wrapper-->

        <!-- navbar-wrapper ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->

        <div id="banner-wrapper">
          {% block banner %}{% endblock %}
        </div>

        <!-- main-wrapper ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->

        <div id="main-wrapper">

          {% block main %}

            <div id="content-wrapper">
              {% block content %}FIXME: content block is required!{% endblock %}
            </div>

            <div id="sidebar-wrapper">
              {% block sidebar %}{% endblock %}
            </div>

            <div class="clear"></div>

          {% endblock %}{# main #}

        </div><!--/#main-wrapper-->

        <!-- footer-wrapper ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->

        <div id="footer-wrapper">

          {% block footer %}

            <div class="footer-left">
              <a href="{% url friday.home %}">{{ site_name_|escape }}</a>
              &bull;
              <a href="{% url friday.about topic='versions' %}">Version {{ website_version_|escape }}</a>
              <br/>
              Built and maintained by <a href="http://www.zhengzhong.net/">ZHENG Zhong</a>
            </div>

            <div class="footer-right">
              <a href="http://appengine.google.com/" rel="external">Google App Engine</a>
              &bull;
              <a href="http://www.python.org/" rel="external">Python {{ python_version_|escape }}</a>
              &bull;
              <a href="http://www.djangoproject.com/" rel="external">Django {{ django_version_|escape }}</a>
              &bull;
              <a href="http://jquery.com/" rel="external">jQuery</a>
              <br/>
              <a href="http://validator.w3.org/check?uri=referer" rel="external">Valid XHTML</a>
              &bull;
              <a href="http://jigsaw.w3.org/css-validator/check/referer" rel="external">Valid CSS</a>
            </div>

            <div class="clear"></div>

          {% endblock %}

        </div><!--/#footer-wrapper-->

      </div><!--/#outer-wrapper-->

    {% endblock %}{# html_body #}

  </body>

</html>



